import App from '../components/app/App';
import { receiveData } from '../action';
import { connect, Dispatch } from 'react-redux';

export function mapStateToProps(state) {
    const { auth = {data: {}}, responsive = {data: {}} } = state.httpData;
    return {auth, responsive};
  }

export function mapDispatchToProps(dispatch) {
  return {
    receiveData: () => dispatch(receiveData)
  }
}

export function mergeProps(stateProps: Object, dispatchProps: Object, ownProps: Object) {
    return Object.assign({}, ownProps, stateProps, dispatchProps);
  }
  
export default connect(mapStateToProps,mapDispatchToProps,mergeProps)(App);